Compiling Laziness Using Projection Types
نویسنده
چکیده
Strictness analysis is accepted as an important tool for the eecient implementation of lazy functional languages. However, the analyses are usually rst-order and the optimisations that follow may be ad hoc. Using projections to represent static properties of programs is appealing because they naturally describe component-wise demand on data structures and can handle latent demands such as head-strictness. However their extension to higher-order functions is problematic. This paper introduces projection types, a notation for expressing static information about higher-order functions that combines the dual aspects of demand on arguments and behaviour of functional arguments. A strictness analysis using projection types is presented and later extended to an optimisation scheme that translates expressions into a language with explicit closure construction and evaluation operations. An important advantage of this approach is that the optimisations are veriied correctness-preserving transformations. This paper extends and complements the results of Ross Paterson, \Compiling Laziness with Projections" presented at the 3rd Static Analysis Symposium, 1996.
منابع مشابه
Demo Proposal: Liquid Types for Haskell
We present LIQUIDHASKELL, a verifier for Haskell programs which uses Liquid Types to reduce the verification of higher-order, polymorphic, recursive programs over complex data types, into first-order Horn Clauses over integers, booleans and uninterpretated functions, which are then solved using classical predicate abstraction. In this demo proposal, we present an overview of this approach, and ...
متن کاملFrom Functional Logic Programs to Purely Functional Programs Preserving Laziness
Functional logic languages extend the setting of functional programming by non-deterministic choices, free variables and narrowing. Most existing approaches to simulate logic features in functional languages do not preserve laziness, i.e., they can only model strict logic programming like in Prolog. Lazy functional logic programming however, has interesting properties supporting a more declarat...
متن کاملA Pure Language with Default Strict Evaluation Order and Explicit Laziness
We propose a pure language with a default strict evaluation order and explicit laziness annotations. These annotations do not make a distinction between the types of values and computations as is often done in lazy additions to strict languages. This supplies all the expressivity available in lazy languages with much of the speed available in strict languages, for the modest cost of programmer ...
متن کاملTitle: Examine Your Laziness. a Lightweight Procedural Debugging Technique for Haskell Examine Your Laziness. a Lightweight Procedural Debugging Technique for Haskell
Writing debuggers for lazy functional languages is known to be difficult. While some recent progress has been made in this area, there is a dearth of practical tools which are applicable to real programs. We present a lightweight approach to procedural debugging, based on the traditional “stop-examine-continue” model using breakpoints. Our debugger sidesteps most of the problematic issues with ...
متن کاملThe mediating role of organizational culture in the effect of organizational laziness on the inertia and organizational performance of the Ministry of Sports and Youth
Abstract Introduction: The main purpose of this study was to investigate the mediating role of organizational culture in the effect of laziness on organizational performance and inertia. Methods: This study was one of the series of correlational descriptive research that was conducted in the field. The statistical population consisted of all the employees of the country's Ministry of Sports an...
متن کامل